/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tools;

import Objects.City;
import Objects.Country;
import Objects.GroupSupplier;
import Objects.Municipality;
import Objects.Parish;
import Objects.Sesion;
import Objects.State;
import Objects.Supplier;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import javafx.scene.control.ComboBox;

/**
 *
 * @author ARMGARCES
 */
public class Datos {
 
    private static Sesion sesion;
    private static int cont_login = 0;
    private static int idScreen = 0;
    private static int idButton = 0;
    private static int stSeniat = 0;

    private static double numRela = 0;
    
    private static String path_im_view;

//    private static Usuario                      usuario;
    private static City                         city;
    private static Country                      country;
    private static GroupSupplier                groupSupplier;
//    private static log_CGuias                   log_cguias;
//    private static log_Guide_rel_inv            log_guide_rel_inv;
//    private static log_TMarca                   log_tmarca;
//    private static log_Personal                 log_personal;
//    private static log_TPersonal                log_tpersonal;
//    private static log_TProced                  log_tproced;
//    private static log_TTransp                  log_ttransp;
//    private static log_Vehiculos                log_vehiculos;
//    private static Measure                      measure;
    private static Municipality                 municipality;
    private static Parish                       parish;
//    private static Sex                          sex;
    private static State                        state;
    private static Supplier                     supplier;
//    private static Unit                         unit;

//    private static ComboBox<Rol>                roles;
    private static ComboBox<Country>            cbCountry;
    private static ComboBox<City>               cbCity;
    private static ComboBox<GroupSupplier>      cbGroupSupplier;
//    private static ComboBox<log_TMarca>         cbMarca;
//    private static ComboBox<log_TPersonal>      cbTPersonal;
//    private static ComboBox<log_TProced>        cbProced;
//    private static ComboBox<log_TTransp>        cbTTransp;
    private static ComboBox<Municipality>       cbMunicipality;
    private static ComboBox<Parish>             cbParish;
//    private static ComboBox<Sex>                cbSex;
    private static ComboBox<State>              cbState;
//    private static ComboBox<Unit>               cbUnit;    
//    private static ItemLeftBar[]                itemLeftBar; 
//    private static Archguip_pro[]               rep_log_guide_pro;
    private static GroupSupplier[]              rep_grp_supplier;
//    private static Measure[]                    rep_measure;
//    private static log_Personal[]               rep_log_personal;
//    private static log_TPersonal[]              rep_log_tpersonal;
//    private static log_Vehiculos[]              rep_log_vehiculo;
    private static Supplier[]                   rep_supplier;
//    private static Unit[]                       rep_unit;
    
    /**
     * @return the sesion
     */
    public static Sesion getSesion() {
        return sesion;
    }
    /**
     * @param _sesion the sesion to set
     */
    public static void setSesion(Sesion _sesion) {
        sesion = _sesion;
    }
    /**
     * @return the cont_login
     */
    public static int getCont_login() {
        return cont_login;
    }
    /**
     * @param aCont_login the cont_login to set
     */
    public static void setCont_login(int aCont_login) {
        cont_login = aCont_login;
    }
    /**
     * 
     */
    public static void sumCont_login() {
        cont_login++;
    }
    /**
     * @return the idScreen
     */
    public static int getIdScreen() {
        return idScreen;
    }
    /**
     * @param aIdScreen the idScreen to set
     */
    public static void setIdScreen(int aIdScreen) {
        idScreen = aIdScreen;
    }    
    /**
     * @return the cont_login
     */
    public static String[] getLocalHost() {
        
        InetAddress ip;

        try {
            ip = InetAddress.getLocalHost();
            NetworkInterface network = NetworkInterface.getByInetAddress(ip);
            byte[] sb = network.getHardwareAddress();

            StringBuilder mac = new StringBuilder();
            for (int i = 0; i < sb.length; i++) {
                    mac.append(String.format("%02X%s", sb[i], (i < sb.length - 1) ? "-" : ""));		
            }
            return new String[] {ip.getHostName(), ip.getHostAddress(), mac.toString()};
            
        } catch (UnknownHostException | SocketException e) {
            Tools.getErrorMessage(e.getStackTrace(), e.getMessage());
 	}
        return null;
    }

//    /**
//     * @return the usuario
//     */
//    public static Usuario getUsuario() {
//        return usuario;
//    }
//
//    /**
//     * @param aUsuario the usuario to set
//     */
//    public static void setUsuario(Usuario aUsuario) {
//        usuario = aUsuario;
//    }
//
//    /**
//     * @return the itemLeftBar
//     */
//    public static ItemLeftBar[] getItemLeftBar() {
//        return itemLeftBar;
//    }
//
//    /**
//     * @param aItemLeftBar the itemLeftBar to set
//     */
//    public static void setItemLeftBar(ItemLeftBar[] aItemLeftBar) {
//        itemLeftBar = aItemLeftBar;
//    }
//
//    /**
//     * @return the roles
//     */
//    public static ComboBox<Rol> getRoles() {
//        return roles;
//    }
//
//    /**
//     * @param roles the roles to set
//     */
//    public static void setRoles(ComboBox<Rol> roles) {
//        Datos.roles = roles;
//    }
//    
//    /**
//     * @return the usuario
//     */
//    public static Measure getMeasure() {
//        return measure;
//    }
//
//    /**
//     * @param aUsuario the usuario to set
//     */
//    public static void setMeasure(Measure aMeasure) {
//        measure = aMeasure;
//    }

    /**
     * @return the groupSupplier
     */
    public static GroupSupplier getGroupSupplier() {
        return groupSupplier;
    }

    /**
     * @param aGroupSupplier the groupSupplier to set
     */
    public static void setGroupSupplier(GroupSupplier aGroupSupplier) {
        groupSupplier = aGroupSupplier;
    }

    /**
     * @return the cbGroupSupplier
     */
    public static ComboBox<GroupSupplier> getCbGroupSupplier() {
        return cbGroupSupplier;
    }

    /**
     * @param aCbGroupSupplier the cbGroupSupplier to set
     */
    public static void setCbGroupSupplier(ComboBox<GroupSupplier> aCbGroupSupplier) {
        cbGroupSupplier = aCbGroupSupplier;
    }

    /**
     * @return the country
     */
    public static Country getCountry() {
        return country;
    }

    /**
     * @param aCountry the country to set
     */
    public static void setCountry(Country aCountry) {
        country = aCountry;
    }

    /**
     * @return the state
     */
    public static State getState() {
        return state;
    }

    /**
     * @param aState the state to set
     */
    public static void setState(State aState) {
        state = aState;
    }

    /**
     * @return the city
     */
    public static City getCity() {
        return city;
    }

    /**
     * @param aCity the city to set
     */
    public static void setCity(City aCity) {
        city = aCity;
    }

    /**
     * @return the municipality
     */
    public static Municipality getMunicipality() {
        return municipality;
    }

    /**
     * @param aMunicipality the municipality to set
     */
    public static void setMunicipality(Municipality aMunicipality) {
        municipality = aMunicipality;
    }

    /**
     * @return the parish
     */
    public static Parish getParish() {
        return parish;
    }

    /**
     * @param aParish the parish to set
     */
    public static void setParish(Parish aParish) {
        parish = aParish;
    }

    /**
     * @return the cbCountry
     */
    public static ComboBox<Country> getCbCountry() {
        return cbCountry;
    }

    /**
     * @param aCbCountry the cbCountry to set
     */
    public static void setCbCountry(ComboBox<Country> aCbCountry) {
        cbCountry = aCbCountry;
    }

    /**
     * @return the cbState
     */
    public static ComboBox<State> getCbState() {
        return cbState;
    }

    /**
     * @param aCbState the cbState to set
     */
    public static void setCbState(ComboBox<State> aCbState) {
        cbState = aCbState;
    }

    /**
     * @return the cbCity
     */
    public static ComboBox<City> getCbCity() {
        return cbCity;
    }

    /**
     * @param aCbCity the cbCity to set
     */
    public static void setCbCity(ComboBox<City> aCbCity) {
        cbCity = aCbCity;
    }

    /**
     * @return the cbMunicipality
     */
    public static ComboBox<Municipality> getCbMunicipality() {
        return cbMunicipality;
    }

    /**
     * @param aCbMunicipality the cbMunicipality to set
     */
    public static void setCbMunicipality(ComboBox<Municipality> aCbMunicipality) {
        cbMunicipality = aCbMunicipality;
    }

    /**
     * @return the cbParish
     */
    public static ComboBox<Parish> getCbParish() {
        return cbParish;
    }

    /**
     * @param aCbParish the cbParish to set
     */
    public static void setCbParish(ComboBox<Parish> aCbParish) {
        cbParish = aCbParish;
    }

    /**
     * @return the supplier
     */
    public static Supplier getSupplier() {
        return supplier;
    }

    /**
     * @param aSupplier the supplier to set
     */
    public static void setSupplier(Supplier aSupplier) {
        supplier = aSupplier;
    }

    /**
     * @return the stSeniat
     */
    public static int getStSeniat() {
        return stSeniat;
    }

    /**
     * @param aStSeniat the stSeniat to set
     */
    public static void setStSeniat(int aStSeniat) {
        stSeniat = aStSeniat;
    }

//    /**
//     * @return the sex
//     */
//    public static Sex getSex() {
//        return sex;
//    }
//
//    /**
//     * @param aSex the sex to set
//     */
//    public static void setSex(Sex aSex) {
//        sex = aSex;
//    }
//
//    /**
//     * @return the cbSex
//     */
//    public static ComboBox<Sex> getCbSex() {
//        return cbSex;
//    }
//
//    /**
//     * @param aCbSex the cbSex to set
//     */
//    public static void setCbSex(ComboBox<Sex> aCbSex) {
//        cbSex = aCbSex;
//    }
//
//    /**
//     * @return the log_personal
//     */
//    public static log_Personal getLog_personal() {
//        return log_personal;
//    }
//
//    /**
//     * @param aLog_personal the log_personal to set
//     */
//    public static void setLog_personal(log_Personal aLog_personal) {
//        log_personal = aLog_personal;
//    }
//
//    /**
//     * @return the cbTPersonal
//     */
//    public static ComboBox<log_TPersonal> getCbTPersonal() {
//        return cbTPersonal;
//    }
//
//    /**
//     * @param aCbTPersonal the cbTPersonal to set
//     */
//    public static void setCbTPersonal(ComboBox<log_TPersonal> aCbTPersonal) {
//        cbTPersonal = aCbTPersonal;
//    }
//
//    /**
//     * @return the cbMarca
//     */
//    public static ComboBox<log_TMarca> getCbMarca() {
//        return cbMarca;
//    }
//
//    /**
//     * @param aCbMarca the cbMarca to set
//     */
//    public static void setCbMarca(ComboBox<log_TMarca> aCbMarca) {
//        cbMarca = aCbMarca;
//    }
//
//    /**
//     * @return the cbProced
//     */
//    public static ComboBox<log_TProced> getCbProced() {
//        return cbProced;
//    }
//
//    /**
//     * @param aCbProced the cbProced to set
//     */
//    public static void setCbProced(ComboBox<log_TProced> aCbProced) {
//        cbProced = aCbProced;
//    }
//
//    /**
//     * @return the cbTTransp
//     */
//    public static ComboBox<log_TTransp> getCbTTransp() {
//        return cbTTransp;
//    }
//
//    /**
//     * @param aCbTTransp the cbTTransp to set
//     */
//    public static void setCbTTransp(ComboBox<log_TTransp> aCbTTransp) {
//        cbTTransp = aCbTTransp;
//    }
//
//    /**
//     * @return the log_vehiculos
//     */
//    public static log_Vehiculos getLog_vehiculos() {
//        return log_vehiculos;
//    }
//
//    /**
//     * @param aLog_vehiculos the log_vehiculos to set
//     */
//    public static void setLog_vehiculos(log_Vehiculos aLog_vehiculos) {
//        log_vehiculos = aLog_vehiculos;
//    }
//
//    /**
//     * @return the rep_log_personal
//     */
//    public static log_Personal[] getRep_log_personal() {
//        return rep_log_personal;
//    }
//
//    /**
//     * @param aRep_personal the rep_log_personal to set
//     */
//    public static void setRep_log_personal(log_Personal[] aRep_personal) {
//        rep_log_personal = aRep_personal;
//    }
//
//    /**
//     * @return the rep_log_vehiculo
//     */
//    public static log_Vehiculos[] getRep_log_vehiculo() {
//        return rep_log_vehiculo;
//    }
//
//    /**
//     * @param aRep_log_vehiculo the rep_log_vehiculo to set
//     */
//    public static void setRep_log_vehiculo(log_Vehiculos[] aRep_log_vehiculo) {
//        rep_log_vehiculo = aRep_log_vehiculo;
//    }
//
//    /**
//     * @return the rep_log_tpersonal
//     */
//    public static log_TPersonal[] getRep_log_tpersonal() {
//        return rep_log_tpersonal;
//    }
//
//    /**
//     * @param aRep_log_tpersonal the rep_log_tpersonal to set
//     */
//    public static void setRep_log_tpersonal(log_TPersonal[] aRep_log_tpersonal) {
//        rep_log_tpersonal = aRep_log_tpersonal;
//    }

    /**
     * @return the rep_grp_supplier
     */
    public static GroupSupplier[] getRep_grp_supplier() {
        return rep_grp_supplier;
    }

    /**
     * @param aRep_grp_supplier the rep_grp_supplier to set
     */
    public static void setRep_grp_supplier(GroupSupplier[] aRep_grp_supplier) {
        rep_grp_supplier = aRep_grp_supplier;
    }

//    /**
//     * @return the rep_measure
//     */
//    public static Measure[] getRep_measure() {
//        return rep_measure;
//    }
//
//    /**
//     * @param aRep_measure the rep_measure to set
//     */
//    public static void setRep_measure(Measure[] aRep_measure) {
//        rep_measure = aRep_measure;
//    }

    /**
     * @return the rep_supplier
     */
    public static Supplier[] getRep_supplier() {
        return rep_supplier;
    }

    /**
     * @param aRep_supplier the rep_supplier to set
     */
    public static void setRep_supplier(Supplier[] aRep_supplier) {
        rep_supplier = aRep_supplier;
    }

//    /**
//     * @return the unit
//     */
//    public static Unit getUnit() {
//        return unit;
//    }
//
//    /**
//     * @param aUnit the unit to set
//     */
//    public static void setUnit(Unit aUnit) {
//        unit = aUnit;
//    }
//
//    /**
//     * @return the rep_unit
//     */
//    public static Unit[] getRep_unit() {
//        return rep_unit;
//    }
//
//    /**
//     * @param aRep_unit the rep_unit to set
//     */
//    public static void setRep_unit(Unit[] aRep_unit) {
//        rep_unit = aRep_unit;
//    }

    /**
     * @return the idButton
     */
    public static int getIdButton() {
        return idButton;
    }

    /**
     * @param aIdButton the idButton to set
     */
    public static void setIdButton(int aIdButton) {
        idButton = aIdButton;
    }

//    /**
//     * @return the rep_log_guide_pro
//     */
//    public static Archguip_pro[] getRep_log_guide_pro() {
//        return rep_log_guide_pro;
//    }
//
//    /**
//     * @param aRep_log_guide_pro the rep_log_guide_pro to set
//     */
//    public static void setRep_log_guide_pro(Archguip_pro[] aRep_log_guide_pro) {
//        rep_log_guide_pro = aRep_log_guide_pro;
//    }
//
//    /**
//     * @return the cbUnit
//     */
//    public static ComboBox<Unit> getCbUnit() {
//        return cbUnit;
//    }
//
//    /**
//     * @param aCbUnit the cbUnit to set
//     */
//    public static void setCbUnit(ComboBox<Unit> aCbUnit) {
//        cbUnit = aCbUnit;
//    }

    /**
     * @return the path_im_view
     */
    public static String getPath_im_view() {
        return path_im_view;
    }

    /**
     * @param aPath_im_view the path_im_view to set
     */
    public static void setPath_im_view(String aPath_im_view) {
        path_im_view = aPath_im_view;
    }

//    /**
//     * @return the log_cguias
//     */
//    public static log_CGuias getLog_cguias() {
//        return log_cguias;
//    }
//
//    /**
//     * @param aLog_cguias the log_cguias to set
//     */
//    public static void setLog_cguias(log_CGuias aLog_cguias) {
//        log_cguias = aLog_cguias;
//    }
//
//    /**
//     * @return the log_guide_rel_inv
//     */
//    public static log_Guide_rel_inv getLog_guide_rel_inv() {
//        return log_guide_rel_inv;
//    }
//
//    /**
//     * @param aLog_guide_rel_inv the log_guide_rel_inv to set
//     */
//    public static void setLog_guide_rel_inv(log_Guide_rel_inv aLog_guide_rel_inv) {
//        log_guide_rel_inv = aLog_guide_rel_inv;
//    }

    /**
     * @return the numRela
     */
    public static double getNumRela() {
        return numRela;
    }

    /**
     * @param aNumRela the numRela to set
     */
    public static void setNumRela(double aNumRela) {
        numRela = aNumRela;
    }


}
